<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<title></title>
	<link rel="stylesheet" href="../../lib/element-ui/theme-chalk/index.css">
	<link rel="stylesheet" href="../../lib/vxe-table/index.css">
	<link rel="stylesheet" href="../../lib/vxe-table-plugin-element/style.css">
	<link rel="stylesheet" href="../../lib/font-awesome/css/font-awesome.min.css">
	<script type="text/javascript" src="../../lib/vue/vue.js"></script>
	<script type="text/javascript" src="../../lib/xe-utils/xe-utils.js"></script>
	<script type="text/javascript" src="../../lib/element-ui/index.js"></script>
	<script type="text/javascript" src="../../lib/vxe-table/index.js"></script>
	<script type="text/javascript" src="../../lib/vxe-table-plugin-element/index.js"></script>
	<script type="text/javascript" src="../../lib/xlsx/xlsx.full.min.js"></script>
	<script type="text/javascript" src="../../lib/vxe-table-plugin-export-xlsx/index.min.js"></script>
	<script type="text/javascript" src="../../lib/xe-ajax/xe-ajax.js"></script>
	<script type="text/javascript" src="../../static/js/jquery.min.js"></script>
	<script type="text/javascript" src="../../lib/echart/echarts.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../lib/layer/layer.min.js"></script>
	<script type="text/javascript" src="../../static/js/MD5/Base64.js"></script>
	<script type="text/javascript" src="../../static/js/MD5/md5.js"></script>
	<script type="text/javascript" src="../../static/js/webApi.js"></script>
	<script type="text/javascript" src="../../static/js/tool.js"></script>
	<style type="text/css">
		html,
		body,
		#app,
		.el-container {
			/*设置内部填充为0，几个布局元素之间没有间距*/
			padding: 0px;
			/*外部间距也是如此设置*/
			margin: 0px;
			/*统一设置高度为100%*/
			height: 100%;
		}

		.el-main {
			padding: 0px;
			height: 100%;
		}
	</style>
</head>

<body>
	<el-container id="app">
		<el-main>
			<iframe src="srcUrl" style="background: #fff;" height="99%" width="100%" allowtransparency="true"
				scrolling="auto" frameborder="0"></iframe>
		</el-main>
	</el-container>
</body>

<script type="text/javascript">
	let vue = null;
	window.onload = function () {
		let main = {
			data() {
				return {
					menuId: "",
					Loading: true,
					srcUrl: ''
				}
			},
			created() {},
			mounted() {
				this.menuId = this.GetQueryString("menu_id");
				this.getMenu();
			},
			watch: {},
			methods: {
				GetQueryString(name) {
					var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
					var r = window.location.search.substr(1).match(reg);
					if (r != null) return decodeURIComponent(r[2]);
					return null;
				},
				getMenu() {
					let that = this;
					let params = {
						menuid: this.menuId
					};
					webApi('/report/getFineReport', 'get', params, function (data) {
						if (data.code == 200) {
							that.srcUrl = data.data;
						} else {
							that.$message({
								message: data.msg,
								type: 'error',
								center: true
							});
						}
					}, function (msg) {})
				}
			}
		};

		vue = Vue.extend(main);
		vue = new vue().$mount('#app');
	}

	function parentSetAvatar(userAvatar) {
		vue.$data.userAvatar = userAvatar;
	}
</script>

</html>